﻿using System.Reflection;
using System;

namespace WJP.DataPortal.Service
{
    public class ServiceHelper
    {
        /// <summary>
        /// 是否输入属性
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        internal static bool IsInput(PropertyInfo property)
        {
            return !property.IsDefined<ServiceOutputAttribute>() || property.IsDefined<ServiceInputAttribute>();
        }

        /// <summary>
        /// 是否输出属性
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        internal static bool IsOutput(PropertyInfo property)
        {
            return property.IsDefined<ServiceOutputAttribute>();
        }
    }
}